<!DOCTYPE html>
<html>
<head>
<title>Welcome Blog</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='bootstrap.v4/css/bootstrap.min.css') }}">
<script src="{{url_for('static', filename='bootstrap.v4/js/jquery.min.js')}}"></script>
<script src="{{url_for('static', filename='bootstrap.v4/js/popper.min.js')}}"></script>
<script src="{{url_for('static', filename='bootstrap.v4/js/bootstrap.min.js')}}"></script>
</head>
<body>
<nav class="navbar navbar-expand-md bg-dark navbar-dark">
  <a class="navbar-brand" href="#">Blog</a>
  <div class="collapse navbar-collapse">
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" href="/">首页</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="/article/index">我的博客</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="/article/post">发布博客</a>
      </li>
      <!--<li class="nav-item">-->
        <!--<a class="nav-link" href="/setting/index">设置</a>-->
      <!--</li>-->
    </ul>

    <!--seesion-->
    <span class="navbar-text" style="margin-left:10%">
      {% if session.username%}
        <a>您好，{{session.username}}！</a>
      {% endif %}
    </span>
    <span class="navbar-text">
      {% if session.username%}
        <a class="nav-link" href="/account/logout">退出</a>
       {% else %}
       <a class="nav-link" href="/account/login">登录</a>
      {% endif %}
    </span>

    <!--cookie-->
    <!--<span class="navbar-text" style="margin-left:10%">-->
      <!--{% if request.cookies.get('username')%}-->
        <!--<a>您好，{{request.cookies.get('username')}}！</a>-->
      <!--{% endif %}-->
    <!--</span>-->
    <!--<span class="navbar-text">-->
      <!--{% if request.cookies.get('username')%}-->
        <!--<a class="nav-link" href="/account/logout">退出</a>-->
       <!--{% else %}-->
       <!--<a class="nav-link" href="/account/login">登录</a>-->
      <!--{% endif %}-->
    <!--</span>-->
  </div>
</nav>

<div class="container-fluid" style="margin-top:10px">
{% block body %}{% endblock %}
</div>
</body>
</html>